package com.profound.notes.main;

import com.profound.notes.ResourceTable;
import com.profound.notes.ViewModelAbility;
import com.profound.notes.main.slice.MainAbilitySlice;
import ohos.aafwk.content.Intent;
import ohos.agp.colors.RgbColor;
import ohos.agp.components.ComponentContainer;
import ohos.agp.components.StackLayout;
import ohos.agp.components.element.ShapeElement;

/**
 * @author zjwujlei
 * @date 2021/4/24
 * @email zjwujlei@sina.com
 * @description
 */
public class MainAbility extends ViewModelAbility {
    @Override
    public void onStart(Intent intent) {
        System.out.println("onStartonStartonStartonStart");
        super.onStart(intent);
        super.setMainRoute(MainAbilitySlice.class.getName());
        StackLayout layout = new StackLayout(this);
        layout.setLayoutConfig(new StackLayout.LayoutConfig(ComponentContainer.LayoutConfig.MATCH_PARENT,ComponentContainer.LayoutConfig.MATCH_PARENT));
        ShapeElement element = new ShapeElement();
        element.setRgbColor(new RgbColor(255,126,0));
        layout.setBackground(element);
        setUIContent(layout);
    }
}
